package cc.comac.mom.datahandlers.entity;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import cc.comac.mom.dao.entity.QarRestrictedPartItemDao;
import cc.comac.mom.entity.QarRestrictedPartItemEntity;
@Component
public class QarRestrictedPartItemDataHandler extends ServiceImpl<QarRestrictedPartItemDao, QarRestrictedPartItemEntity>{

	@Autowired
	private QarRestrictedPartItemDao qarRestrictedPartItemDao;
	public List<QarRestrictedPartItemEntity> selectByQuery(QueryWrapper<QarRestrictedPartItemEntity> query){
		List<QarRestrictedPartItemEntity> selectList = qarRestrictedPartItemDao.selectList(query);
		return selectList;
	}
	
	
	public void insertBatch (List<QarRestrictedPartItemEntity> list) {
		this.saveBatch(list, list.size());
	}
	
	
	public void updateBatch (List<QarRestrictedPartItemEntity> list) {
		this.updateBatchById(list, list.size());
	}
	
	public void deleteBatch (List<QarRestrictedPartItemEntity> list) {
		this.updateBatchById(list,list.size());
	}
}
